﻿using System;
using System.Collections.Generic;
using System.Text;

namespace utils.EX
{
    /// <summary>
    /// 异常类
    /// </summary>
    [Serializable]
    public class MyException : ApplicationException
    {
        private readonly ExceptionResult _exceptionResult;
        public MyException() { }
        public MyException(int resultStatus, string resultMsg) : base(resultMsg)
        {
            _exceptionResult = new ExceptionResult { resultMsg = resultMsg, resultStatus = resultStatus };
        }
        public ExceptionResult GetExceptionResult()
        {
            return _exceptionResult;
        }
    }
    public class ExceptionResult
    {
        public int resultStatus { get; set; }
        public string resultMsg { get; set; }
    }
}
